/*
 * @Author: zf
 * @Date: 2022-11-28 11:51:53
 * @LastEditTime: 2022-11-30 20:01:59
 * @Description:
 */
import service from ".";
interface loginData {
    adminAccount: string,
    password: string
}
interface formData {
    adminAccount: string,
    email: string,
    imageUrl: string,
    password: string,
    password2: string,
    password3: string,
}
interface LimitPage {
    limit: Number,
    page: number
}
//登录接口
export function login(data: loginData) {
    return service({
        url: "/admin/login",
        method: 'post',
        data
    })
}
//首页数据获取接口
//会员数量
export function findVip() {
    return service({
        url: "/memberCard/findAll",
        method: 'get',

    })
}
//今日课程

//今日私教
//今日团课
//修改密码
export function updatePassWord(data: formData) {
    return service({
        url: "/admin/updateAdmin",
        method: 'post',
        data
    })
}
//预约列表接口
export function getRecordAppointment(params) {
    return service({
        url: "/appointmentRecord/selectAppointmentCourseList",
        method: "get",
        params
    })
}
//根据id的查看预约详情
export function getDetail(params) {
    return service({
        url: "/appointmentRecord/selectByCourseId",
        method: "get",
        params
    })
}
//查询所有教练
export function getCoachFindALll() {
    return service({
        url: "/coach/findAll",
        method: "get",

    })
}

//签到记录接口
export function getSign() {
    return service({
        url: '/coachSign/selectCoachSingList',
        method: 'get'
    })
}
//学员签到
export function UserSign(params) {
    return service({
        url: '/appointmentRecord/updateSignedStatus',
        method: 'get',
        params
    })
}
//取消预约
export function cancelSigns(params) {
    return service({
        url: '/appointmentRecord/deleteById',
        method: 'get',
        params

    })
}
//getBooking接口
export function getBooking() {
    return service({
        url: "/RecordAppointment",
        method: "get"
    })
}
//佳会
//ListVenues接口
export function ListVenues(params) {
    return service({
        url: "/venue/list",
        method: "get",
        params
    })
}
// 编辑场馆接口
export function searchVenues(params) {
    return service({
        url: "/venue/find",
        method: "get",
        params
    })
}
// 删除场馆接口
export function deleteVenues(params) {
    return service({
        url: "/venue/delete",
        method: "get",
        params
    })
}
// 添加场馆接口
export function addVenues(data) {
    return service({
        url: "/venue/add",
        method: "post",
        data: data
    })
}
// 修改场馆接口
export function updateVenues(data) {
    return service({
        url: "/venue/update",
        method: "post",
        data: data
    })
}
//王宇
//用户 查询所有用户
export function getAllList() {
    return service({
        url: '/user/findAll',
        method: 'get'
    })
}
// 团课课程列表接口
export function getClassList(params) {
    return service({
        url: "/class/list",
        method: "get",
        params: params
    })
}
// 删除团课课程列表
export function deleteClassList(params) {
    return service({
        url: "/class/delete",
        method: "get",
        params: params
    })
}
// 添加团课课程列表
export function addClassList(data) {
    return service({
        url: "/class/add",
        method: "post",
        data: data
    })
}
// 根据id查询团课课程表
export function findClassList(params) {
    return service({
        url: "/class/find",
        method: "get",
        params: params
    })
}
// 修改团课课程
export function updateClassList(data) {
    return service({
        url: "/class/update",
        method: "post",
        data: data
    })
}
// 查找团课课表
export function findCourseList(params) {
    return service({
        url: "/course/list",
        method: "get",
        params: params
    })
}
// 删除团课课表
export function deleteCourseList(params) {
    return service({
        url: "/course/delete",
        method: "get",
        params: params
    })
}
// 查找教练课程
export function findPrivateCourse(data) {
    return service({
        url: "privateCourse/list",
        method: "post",
        data: data
    })
}
// 添加私教课程
export function addPrivateCourse(data) {
    return service({
        url: "/privateCourse/add",
        method: "post",
        data: data
    })
}
// 删除私教课程
export function deletePrivateCourse(params) {
    return service({
        url: "/privateCourse/delete",
        method: "get",
        params: params
    })
}
// 根据id查询私教课程表
export function findIdPrivateCourse(params) {
    return service({
        url: "/privateCourse/find",
        method: "get",
        params: params
    })
}
// 修改【私教课程表】表数据
export function updatePrivateCourse(data) {
    return service({
        url: "/privateCourse/update",
        method: "post",
        data: data
    })
}
// 新增排期到【私教排课表】
export function addPrivateCourseSchedule(data) {
    return service({
        url: "/privateCourseSchedule/add",
        method: "post",
        data: data
    })
}
// 查找所有教练
export function findCoach() {
    return service({
        url: "/coach/findAll",
        method: "get"
    })
}
// 查询指定课程的预约订单的详情
export function findAppointmentRecord(params) {
    return service({
        url: "/appointmentRecord/selectByCourseId",
        method: "get",
        params: params
    })
}
// 根据预约记录id修改用户的签到状态
export function cancelCoachSign(params) {
    return service({
        url: "/appointmentRecord/updateSignedStatus",
        method: "get",
        params: params
    })
}
// 根据预约记录id'取消预约'
export function cancelAppointmentRecord(params) {
    return service({
        url: "/appointmentRecord/updateCancelStatus",
        method: "get",
        params: params
    })
}

// 查询评论
export function selectAppraise(params) {
    return service({
        url: "/appraise/findAll",
        method: "get",
        params: params
    })
}

// 新增数据到【私教排课表】
export function addCourseSchedule(data) {
    return service({
        url: "/privateCourseSchedule/add",
        method: "post",
        data: data
    })
}

// 查询场馆
export function findVenue(params) {
    return service({
        url: "/venue/list",
        method: "get",
        params: params
    })
}




//蒋旗 成员管理
export function obscure(params) {
    return service({
        url: '/admin/list',
        method: 'get',
        params: params


    })
}
//蒋旗 成员管理添加
export function addMember(data) {
    return service({
        url: '/admin/add',
        method: 'post',
        data: data
    })
}
//蒋旗 渲染部门
export function department() {
    return service({
        url: "/department/findAll",
        method: 'get'
    })
}
//蒋旗 根据id 查找
export function editID(params) {
    return service({
        url: '/admin/find',
        method: 'get',
        params: params
    })
}
//蒋旗 修改管理员
export function modifyMember(data) {
    return service({
        url: '/admin/update',
        method: 'post',
        data: data
    })
}
//蒋旗 删除管理员
export function deleteMember(id) {
    return service({
        url: '/admin/delete',
        method: 'get',
        params: {
            id
        }
    })
}
//蒋旗 角色列表
export function RoleManagement(params) {
    return service({
        url: '/department/list',
        method: 'get',
        params: params
    })
}
//蒋旗 新增角色
export function addRoleManagement(data) {
    return service({
        url: '/department/add',
        method: 'post',
        data: data

    })
}
//蒋旗 删除部门
export function deleteRole(id) {
    return service({
        url: '/department/delete',
        method: 'get',
        params: {
            id
        }
    })
}
//蒋旗 渲染场馆
export function venueList() {
    return service({
        url: '/venue/list',
        method: 'get'
    })
}
//蒋旗 根据id查找部门
export function findDepartmentById(params) {
    return service({
        url: '/department/find',
        method: "get",
        params,
    })
}
//蒋旗 广告列表
export function adviceList(params) {
    return service({
        url: '/advertisement/findAll',
        method: 'get',
        params
    })
}
//蒋旗 广告搜索
export function searchAdvice(params) {
    return service({
        url: '/advertisement/list',
        method: 'get',
        params: params
    })
}
//蒋旗 广告新增
export function addAdvice(data) {
    return service({
        url: '/advertisement/add',
        method: "post",
        data
    })
}
//蒋旗 广告删除
export function deleteAdvice(params) {
    return service({
        url: '/advertisement/delete',
        method: 'get',
        params
    })
}
//蒋旗 图片上传
export function uploadImage(data) {
    return service({
        url: '/upload/image',
        method: 'post',
        data,
    })
}
//蒋旗 批量删除
export function deletes(data) {
    return service({
        url: '/advertisement/deleteByIds',
        method: 'post',
        data
    })
}
//蒋旗 批量修改状态
export function modifies(data) {
    return service({
        url: '/advertisement/updateState',
        method: 'post',
        data
    })
}